package bg.btanev.eightyfour.service;

import java.util.List;

import bg.btanev.eightyfour.domain.person.ContactInfo;
import bg.btanev.eightyfour.domain.person.Person;
import bg.btanev.eightyfour.domain.person.PersonName;

/**
 *
 * @author B.Tanev
 *
 */
public interface PersonService {
	Person createAndStorePerson(PersonName personName, ContactInfo contactInfo);

	void savePerson(Person person);

	void deletePerson(Person person);

	Person findByEmail(String email);

	/**
	 * Search for a person name. Performs case insensitive search.
	 *
	 * @param name
	 *            the {@link PersonName} to search for
	 * @return a {@link List} of {@link Person}s
	 */
	List<Person> findByExactName(PersonName name);

	Person findByIdentifier(Long personId);

	Person updatePersonDetails(Long identifier, PersonName personName, ContactInfo contactInfo);
}
